#pragma once

#include "Math/Math.h"
#include <vector>
#include <string>

#define HALTON_SAMPLES 16

struct OpaqueObject
{
	uint32 pad;
};

struct MaterialGpu {

	glm::vec4 albedo;
	glm::vec4 emissive;
	glm::vec4 roughnessMetallic;

	MaterialGpu()
	{
		albedo = glm::vec4(0.f);
		emissive = glm::vec4(0.f);
		roughnessMetallic = glm::vec4(0.f);
	}
};

struct VertexGpu
{
	glm::vec3 position;
	glm::vec3 normal;
	glm::vec3 tangent;
	glm::vec2 uv;
};

struct GBufferPushConstants
{
	glm::mat4 model;
	glm::mat4 prevModel;
	uint32 objectIndex;
	float roughnessMultiplier;
};

struct PerFrameUbo
{
	__declspec(align(16))
	glm::mat4 viewInverse;
	__declspec(align(16))
	glm::mat4 projInverse;
	__declspec(align(16))
	glm::mat4 projViewInverse;
	__declspec(align(16))
	glm::mat4 prevProjView;
	__declspec(align(16))
	glm::mat4 projView;
	__declspec(align(16))
	glm::vec4 cameraPosition;
	__declspec(align(16))
	glm::vec4 currentPrevJitter;
};

struct ObjectDescGpu
{
	uint64 vertexAddress;
	uint64 indexAddress;
};

float HaltonSequence(int base, int index);


